#include <iostream>
#include "MyArray.h"
#include "Sort.h"
#include "BubbleSort.h"
#include "InsertionSort.h"
using namespace std;

void main()
{
	char size = 3;
	MyArray<char> mang;
	
	mang.Push('a');
	mang.Push('b');
	mang.Push('c');
	mang.Push('d');
	mang.Push('e');
	mang.Push('f');
	
	cout << "\nMang truoc khi xoa : ";
	for (int i = 0; i < mang.Count(); i++)
		cout << mang[i] << "  "; 

	cout << "\nSo luong phan tu : " << mang.Count();
	cout << "\nPhan tu cuoi cung : " << mang[mang.Count() - 1] << "\n";

	mang.Delete(mang.Count() - 1);
	mang.Insert('k', 0);

	cout << "\nMang sau khi xoa va chen : ";
	for (int i = 0; i < mang.Count(); i++)
		cout << mang[i] << "  "; 

	cout << "\nSo luong phan tu : " << mang.Count();
	cout << "\nPhan tu cuoi cung : " << mang[mang.Count() - 1] << "\n";

	cout << "\nSap xep lai mang : ";
	Sort<char> *s;
	s = new InsertionSort<char>();


	int m;
	cin >> m;
}